package com.lizy;

import com.lizy.controller.Context;
import com.lizy.service.impl.StrategyImpl;

/**
 * @author : Li
 * @date : 2024-10-09 14:10
 * @description :
 **/
public class Demo1 {
    public static void main(String[] args) {

        Context context = new Context(new StrategyImpl());
        System.out.println("10 + 5 = " + context.executeStrategy(10, 5));

        context = new Context(new StrategyImpl());
        System.out.println("10 - 5 = " + context.executeStrategy2(10, 5));

        context = new Context(new StrategyImpl());
        System.out.println("10 * 5 = " + context.executeStrategy3(10, 5));

        context = new Context(new StrategyImpl());
        System.out.println("10 / 5 = "+ context.executeStrategy4(10, 5));


    }
}

